<extend name="Layout/ins_popup" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'输入不接受原因'))}
	<form method='post' id="form_data_reject" name="form_data_reject" >
		<input type="hidden" id="ajax" name="ajax" value="1">
		<input type="hidden" name="id" value="{$task_log.id}">	
		<input type="hidden" name="task_id" value="{$task_log.task_id}">		
		<input type="hidden" name="status" value="5">
		<div class="layui-form-item panel-body">
			<textarea id="feed_back" name="feed_back" class="simple" style="height:120px" check="required" info="请填写原因">{$task_todo.feed_back}</textarea>
		</div>
		<div class="action">
			<input class="btn" type="button" value="提交" id="btn_save">
			<input  class="btn btn-cancel" type="button" value="取消" onclick="myclose();">
		</div>
	</form>
</block>
<block name="js">
	<script type="text/javascript">
		var index = parent.layer.getFrameIndex(window.name);
		layui.use('global', function() {
			var $ = layui.jquery;
			$('#btn_save').on('click', function() {
				layer.msg('不接受以后不能修改了,是否继续提交?', {
					time : 0,
					btn : ['提交', '取消'],
					yes : function(index) {
						send_form('form_data_reject', '{:U("reject")}', '', function(ret) {
							if (ret.status == 1) {
								parent.layer.msg(ret.info);						
								parent.location.reload(true);
							} else {
								layer.msg(ret.info);
								return false;
							}
						});
					},
					no : function(index) {
						layer.close(index);
					}
				});

			});
		});

	</script>
</block>
